package cn.exrick.xboot.modules.masterdata.server.call;

import cn.exrick.xboot.modules.masterdata.server.sendData.IMdmSubscribe;
import cn.exrick.xboot.modules.masterdata.server.sendData.MdmSubscribeServiceLocator;
import cn.exrick.xboot.modules.masterdata.server.utils.Dom4JforXML;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

@Slf4j
@Service
public class CallMasterSendData {
    public String sendDataStates(String sendDataStatesXml){
        String data=null;
        try {
            MdmSubscribeServiceLocator locator = new MdmSubscribeServiceLocator();
            IMdmSubscribe mdmSubscribeServicePort = locator.getMdmSubscribeServicePort();
            data = mdmSubscribeServicePort.sendDataStates("PORTAL", sendDataStatesXml);
            //System.out.println(data);
        } catch (Exception ex) {
            ex.printStackTrace();
        }
        return data;
    }


    public static void main(String[] args) {
      /*  String s = new CallMasterSendData().sendDataStates("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" +
                "\n" +
                "<sendData> \n" +
                "  <taskId>E406342F42EC3043F520E8805B2D427E</taskId>\n" +
                "  <datas>\n" +
                "    <data tableName=\"MD_MIDSTAFF\">\n" +
                "      <createUnit>--</createUnit>\n" +
                "      <recid>6EAFE23E60000081C2A633649E3F4761</recid>\n" +
                "      <version>7975842222622900385</version>\n" +
                "      <sendDetail>成功</sendDetail>\n" +
                "      <sendState>1</sendState> \n" +
                "    </data>\n" +
                "    <data tableName=\"MD_MIDSTAFF\">\n" +
                "      <createUnit>--</createUnit>\n" +
                "      <recid>6EAFE23E600000C1CFEBCB39884D8089</recid>\n" +
                "      <version>7975842222622900449</version>\n" +
                "      <sendDetail>成功</sendDetail>\n" +
                "      <sendState>1</sendState> \n" +
                "    </data>\n" +
                "  </datas>\n" +
                "</sendData>");
        System.out.println(s);*/
    }
}
